package pe.gob.osinergmin.bean.common;

import pe.gob.osinergmin.bean.generic.GenericBean;
import pe.gob.osinergmin.utils.PuntoControlUtils;

public class Usuario extends GenericBean {

    private String username;
    private String password;

    private String nombre;
    private String apellidoPaterno;
    private String apellidoMaterno;

    public Usuario(){
        super();
    }

    public Usuario(String username, String password){
        this.username = username;
        this.password = password;
    }

    public String getUsername(){
        return this.username;
    }

    public void setUsername(String username){
        this.username = username;
    }

    public String getPassword(){
        return this.password;
    }

    public void setPassword(String password){
        this.password = password;
    }

    public String getNombre() {
        return nombre;
    }

    public String getApellidoPaterno() {
        return apellidoPaterno;
    }

    public String getApellidoMaterno() {
        return apellidoMaterno;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public void setApellidoPaterno(String apellidoPaterno) {
        this.apellidoPaterno = apellidoPaterno;
    }

    public void setApellidoMaterno(String apellidoMaterno) {
        this.apellidoMaterno = apellidoMaterno;
    }

    public String getNombreCompleto(){
        return getNombre() + ' ' + getApellidoPaterno() + ' ' + getApellidoMaterno();
    }

    public String toString() {
        return PuntoControlUtils.convertFromObjectToJsonString(this, new String[]{"username", "password", "nombre", "apellidoPaterno", "apellidoMaterno"});
    }
}